home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / wininet.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  48.7 KB  |  1,629 lines

  1. /*++
  2.  
  3. Copyright (c) 1995-1998  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     wininet.h
  8.  
  9. Abstract:
  10.  
  11.     Contains manifests, macros, types and prototypes for Microsoft Windows
  12.     Internet Extensions
  13.  
  14. --*/
  15.  
  16. #if !defined(_WININET_)
  17. #define _WININET_
  18.  
  19. /*
  20.  * Set up Structure Packing to be 4 bytes
  21.  * for all wininet structures
  22.  */
  23.  
  24. #pragma pack(push, wininet, 4)
  25.  
  26. #if defined(__cplusplus)
  27. extern "C" {
  28. #endif
  29.  
  30. #if !defined(_WINX32_)
  31. #define INTERNETAPI DECLSPEC_IMPORT
  32. #else
  33. #define INTERNETAPI
  34. #endif
  35.  
  36. //
  37. // internet types
  38. //
  39.  
  40. typedef LPVOID HINTERNET;
  41. typedef HINTERNET * LPHINTERNET;
  42.  
  43. typedef WORD INTERNET_PORT;
  44. typedef INTERNET_PORT * LPINTERNET_PORT;
  45.  
  46. //
  47. // Internet APIs
  48. //
  49.  
  50. //
  51. // manifests
  52. //
  53.  
  54. #define INTERNET_INVALID_PORT_NUMBER    0           // use the protocol-specific default
  55.  
  56. #define INTERNET_DEFAULT_FTP_PORT       21          // default for FTP servers
  57. #define INTERNET_DEFAULT_GOPHER_PORT    70          //    "     "  gopher "
  58. #define INTERNET_DEFAULT_HTTP_PORT      80          //    "     "  HTTP   "
  59. #define INTERNET_DEFAULT_HTTPS_PORT     443         //    "     "  HTTPS  "
  60. #define INTERNET_DEFAULT_SOCKS_PORT     1080        // default for SOCKS firewall servers.
  61.  
  62. #define MAX_CACHE_ENTRY_INFO_SIZE       4096
  63.  
  64. //
  65. // maximum field lengths (arbitrary)
  66. //
  67.  
  68. #define INTERNET_MAX_HOST_NAME_LENGTH   256
  69. #define INTERNET_MAX_USER_NAME_LENGTH   128
  70. #define INTERNET_MAX_PASSWORD_LENGTH    128
  71. #define INTERNET_MAX_PORT_NUMBER_LENGTH 5           // INTERNET_PORT is unsigned short
  72. #define INTERNET_MAX_PORT_NUMBER_VALUE  65535       // maximum unsigned short value
  73. #define INTERNET_MAX_PATH_LENGTH        2048
  74. #define INTERNET_MAX_PROTOCOL_NAME      "gopher"    // longest protocol name
  75. #define INTERNET_MAX_URL_LENGTH         ((sizeof(INTERNET_MAX_PROTOCOL_NAME) - 1) \
  76.                                         + sizeof("://") \
  77.                                         + INTERNET_MAX_PATH_LENGTH)
  78.  
  79. //
  80. // values returned by InternetQueryOption() with INTERNET_OPTION_KEEP_CONNECTION:
  81. //
  82.  
  83. #define INTERNET_KEEP_ALIVE_UNKNOWN     ((DWORD)-1)
  84. #define INTERNET_KEEP_ALIVE_ENABLED     1
  85. #define INTERNET_KEEP_ALIVE_DISABLED    0
  86.  
  87. //
  88. // flags returned by InternetQueryOption() with INTERNET_OPTION_REQUEST_FLAGS
  89. //
  90.  
  91. #define INTERNET_REQFLAG_FROM_CACHE     0x00000001
  92. #define INTERNET_REQFLAG_ASYNC          0x00000002
  93.  
  94. //
  95. // flags common to open functions (not InternetOpen()):
  96. //
  97.  
  98. #define INTERNET_FLAG_RELOAD            0x80000000  // retrieve the original item
  99.  
  100. //
  101. // flags for InternetOpenUrl():
  102. //
  103.  
  104. #define INTERNET_FLAG_RAW_DATA          0x40000000  // receive the item as raw data
  105. #define INTERNET_FLAG_EXISTING_CONNECT  0x20000000  // do not create new connection object
  106.  
  107. //
  108. // flags for InternetOpen():
  109. //
  110.  
  111. #define INTERNET_FLAG_ASYNC             0x10000000  // this request is asynchronous (where supported)
  112.  
  113. //
  114. // protocol-specific flags:
  115. //
  116.  
  117. #define INTERNET_FLAG_PASSIVE           0x08000000  // used for FTP connections
  118.  
  119. //
  120. // additional cache flags
  121. //
  122.  
  123. #define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000  // don't write this item to the cache
  124. #define INTERNET_FLAG_DONT_CACHE        INTERNET_FLAG_NO_CACHE_WRITE
  125.  
  126. #define INTERNET_FLAG_MAKE_PERSISTENT   0x02000000  // make this item persistent in cache
  127.  
  128. #define INTERNET_FLAG_OFFLINE           0x01000000  // use offline semantics
  129.  
  130. //
  131. // additional flags
  132. //
  133.  
  134. #define INTERNET_FLAG_WTVP_MODE         0x00020000  // Communicate with WebTV protocol server 
  135.  
  136. #define INTERNET_FLAG_SECURE            0x00800000  // use PCT/SSL if applicable (HTTP)
  137.  
  138. #define INTERNET_FLAG_KEEP_CONNECTION   0x00400000  // use keep-alive semantics
  139.  
  140. #define INTERNET_FLAG_NO_AUTO_REDIRECT  0x00200000  // don't handle redirections automatically
  141.  
  142. #define INTERNET_FLAG_READ_PREFETCH     0x00100000  // do background read prefetch
  143.  
  144. #define INTERNET_FLAG_NO_COOKIES        0x00080000  // no automatic cookie handling
  145.  
  146. #define INTERNET_FLAG_NO_AUTH           0x00040000  // no automatic authentication handling
  147.  
  148. //
  149. // Security Ignore Flags, Allow HttpOpenRequest to overide
  150. //  Secure Channel (SSL/PCT) failures of the following types.
  151. //
  152.  
  153. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   0x00008000 // ex: https:// to http://
  154.  
  155. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  0x00004000 // ex: http:// to https://
  156.  
  157. #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000 // expired X509 Cert.
  158.  
  159. #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000 // bad common name in X509 Cert.
  160.  
  161. //more caching flags
  162. #define INTERNET_FLAG_MUST_CACHE_REQUEST        0x00000010 // fails if unable to cache request
  163. #define INTERNET_FLAG_RESYNCHRONIZE             0x00000800 // asking wininet to update an item if it is newer
  164. #define INTERNET_FLAG_HYPERLINK                 0x00000400 // asking wininet to
  165.                                                            //do hyperlinking semantic which works right for scripts
  166. #define INTERNET_FLAG_NO_UI                     0x00000200
  167.  
  168. //
  169. // flags for FTP
  170. //
  171.  
  172. #define INTERNET_FLAG_TRANSFER_ASCII    FTP_TRANSFER_TYPE_ASCII
  173. #define INTERNET_FLAG_TRANSFER_BINARY   FTP_TRANSFER_TYPE_BINARY
  174.  
  175. //
  176. // flags field masks
  177. //
  178.  
  179. #define SECURITY_INTERNET_MASK  (INTERNET_FLAG_IGNORE_CERT_CN_INVALID    |  \
  180.                                  INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  |  \
  181.                                  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  |  \
  182.                                  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   )
  183.  
  184. #define SECURITY_SET_MASK       SECURITY_INTERNET_MASK
  185.  
  186. #define INTERNET_FLAGS_MASK     (INTERNET_FLAG_RELOAD               \
  187.                                 | INTERNET_FLAG_RAW_DATA            \
  188.                                 | INTERNET_FLAG_EXISTING_CONNECT    \
  189.                                 | INTERNET_FLAG_ASYNC               \
  190.                                 | INTERNET_FLAG_PASSIVE             \
  191.                                 | INTERNET_FLAG_NO_CACHE_WRITE      \
  192.                                 | INTERNET_FLAG_MAKE_PERSISTENT     \
  193.                                 | INTERNET_FLAG_OFFLINE             \
  194.                                 | INTERNET_FLAG_SECURE              \
  195.                                 | INTERNET_FLAG_KEEP_CONNECTION     \
  196.                                 | INTERNET_FLAG_NO_AUTO_REDIRECT    \
  197.                                 | INTERNET_FLAG_READ_PREFETCH       \
  198.                                 | INTERNET_FLAG_NO_COOKIES          \
  199.                                 | INTERNET_FLAG_NO_AUTH             \
  200.                                 | SECURITY_INTERNET_MASK            \
  201.                                 | INTERNET_FLAG_TRANSFER_ASCII      \
  202.                                 | INTERNET_FLAG_TRANSFER_BINARY     \
  203.                                 | INTERNET_FLAG_RESYNCHRONIZE       \
  204.                                 | INTERNET_FLAG_MUST_CACHE_REQUEST  \
  205.                                 | INTERNET_FLAG_HYPERLINK           \
  206.                                 | INTERNET_FLAG_NO_UI               \
  207.                                 )
  208.  
  209. #define INTERNET_OPTIONS_MASK   (~INTERNET_FLAGS_MASK)
  210.  
  211. //
  212. // INTERNET_NO_CALLBACK - if this value is presented as the dwContext parameter
  213. // then no call-backs will be made for that API
  214. //
  215.  
  216. #define INTERNET_NO_CALLBACK            0
  217.  
  218. //
  219. // structures/types
  220. //
  221.  
  222. //
  223. // INTERNET_SCHEME - enumerated URL scheme type
  224. //
  225.  
  226. typedef enum {
  227.     INTERNET_SCHEME_PARTIAL = -2,
  228.     INTERNET_SCHEME_UNKNOWN = -1,
  229.     INTERNET_SCHEME_DEFAULT = 0,
  230.     INTERNET_SCHEME_FTP,
  231.     INTERNET_SCHEME_GOPHER,
  232.     INTERNET_SCHEME_HTTP,
  233.     INTERNET_SCHEME_HTTPS,
  234.     INTERNET_SCHEME_FILE,
  235.     INTERNET_SCHEME_NEWS,
  236.     INTERNET_SCHEME_MAILTO,
  237.     INTERNET_SCHEME_SOCKS,
  238.     INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
  239.     INTERNET_SCHEME_LAST = INTERNET_SCHEME_SOCKS
  240. } INTERNET_SCHEME, * LPINTERNET_SCHEME;
  241.  
  242. //
  243. // INTERNET_ASYNC_RESULT - this structure is returned to the application via
  244. // the callback with INTERNET_STATUS_REQUEST_COMPLETE. It is not sufficient to
  245. // just return the result of the async operation. If the API failed then the
  246. // app cannot call GetLastError() because the thread context will be incorrect.
  247. // Both the value returned by the async API and any resultant error code are
  248. // made available. The app need not check dwError if dwResult indicates that
  249. // the API succeeded (in this case dwError will be ERROR_SUCCESS)
  250. //
  251.  
  252. typedef struct {
  253.  
  254.     //
  255.     // dwResult - the HINTERNET, DWORD or BOOL return code from an async API
  256.     //
  257.  
  258.     DWORD dwResult;
  259.  
  260.     //
  261.     // dwError - the error code if the API failed
  262.     //
  263.  
  264.     DWORD dwError;
  265. } INTERNET_ASYNC_RESULT, * LPINTERNET_ASYNC_RESULT;
  266.  
  267. //
  268. // INTERNET_PREFETCH_STATUS -
  269. //
  270.  
  271. typedef struct {
  272.  
  273.     //
  274.     // dwStatus - status of download. See INTERNET_PREFETCH_ flags
  275.     //
  276.  
  277.     DWORD dwStatus;
  278.  
  279.     //
  280.     // dwSize - size of file downloaded so far
  281.     //
  282.  
  283.     DWORD dwSize;
  284. } INTERNET_PREFETCH_STATUS, * LPINTERNET_PREFETCH_STATUS;
  285.  
  286. //
  287. // INTERNET_PREFETCH_STATUS - dwStatus values
  288. //
  289.  
  290. #define INTERNET_PREFETCH_PROGRESS  0
  291. #define INTERNET_PREFETCH_COMPLETE  1
  292. #define INTERNET_PREFETCH_ABORTED   2
  293.  
  294. //
  295. // INTERNET_PROXY_INFO - structure supplied with INTERNET_OPTION_PROXY to get/
  296. // set proxy information on a InternetOpen() handle
  297. //
  298.  
  299. typedef struct {
  300.  
  301.     //
  302.     // dwAccessType - INTERNET_OPEN_TYPE_DIRECT, INTERNET_OPEN_TYPE_PROXY, or
  303.     // INTERNET_OPEN_TYPE_PRECONFIG (set only)
  304.     //
  305.  
  306.     DWORD dwAccessType;
  307.  
  308.     //
  309.     // lpszProxy - proxy server list
  310.     //
  311.  
  312.     LPCSTR lpszProxy;
  313.  
  314.     //
  315.     // lpszProxyBypass - proxy bypass list
  316.     //
  317.  
  318.     LPCSTR lpszProxyBypass;
  319. } INTERNET_PROXY_INFOA, * LPINTERNET_PROXY_INFOA;
  320.  
  321. typedef struct {
  322.  
  323.     //
  324.     // dwAccessType - INTERNET_OPEN_TYPE_DIRECT, INTERNET_OPEN_TYPE_PROXY, or
  325.     // INTERNET_OPEN_TYPE_PRECONFIG (set only)
  326.     //
  327.  
  328.     DWORD dwAccessType;
  329.  
  330.     //
  331.     // lpszProxy - proxy server list
  332.     //
  333.  
  334.     LPCWSTR lpszProxy;
  335.  
  336.     //
  337.     // lpszProxyBypass - proxy bypass list
  338.     //
  339.  
  340.     LPCWSTR lpszProxyBypass;
  341. } INTERNET_PROXY_INFOW, * LPINTERNET_PROXY_INFOW;
  342.  
  343. #ifdef UNICODE
  344. typedef INTERNET_PROXY_INFOW INTERNET_PROXY_INFO;
  345. typedef LPINTERNET_PROXY_INFOW LPINTERNET_PROXY_INFO;
  346. #else
  347. typedef INTERNET_PROXY_INFOA INTERNET_PROXY_INFO;
  348. typedef LPINTERNET_PROXY_INFOA LPINTERNET_PROXY_INFO;
  349. #endif // UNICODE
  350.  
  351. //
  352. // INTERNET_VERSION_INFO - version information returned via
  353. // InternetQueryOption(..., INTERNET_OPTION_VERSION, ...)
  354. //
  355.  
  356. typedef struct {
  357.     DWORD dwMajorVersion;
  358.     DWORD dwMinorVersion;
  359. } INTERNET_VERSION_INFO, * LPINTERNET_VERSION_INFO;
  360.  
  361. //
  362. // URL_COMPONENTS - the constituent parts of an URL. Used in InternetCrackUrl()
  363. // and InternetCreateUrl()
  364. //
  365. // For InternetCrackUrl(), if a pointer field and its corresponding length field
  366. // are both 0 then that component is not returned; If the pointer field is NULL
  367. // but the length field is not zero, then both the pointer and length fields are
  368. // returned; if both pointer and corresponding length fields are non-zero then
  369. // the pointer field points to a buffer where the component is copied. The
  370. // component may be un-escaped, depending on dwFlags
  371. //
  372. // For InternetCreateUrl(), the pointer fields should be NULL if the component
  373. // is not required. If the corresponding length field is zero then the pointer
  374. // field is the address of a zero-terminated string. If the length field is not
  375. // zero then it is the string length of the corresponding pointer field
  376. //
  377.  
  378. typedef struct {
  379.     DWORD   dwStructSize;       // size of this structure. Used in version check
  380.     LPSTR   lpszScheme;         // pointer to scheme name
  381.     DWORD   dwSchemeLength;     // length of scheme name
  382.     INTERNET_SCHEME nScheme;    // enumerated scheme type (if known)
  383.     LPSTR   lpszHostName;       // pointer to host name
  384.     DWORD   dwHostNameLength;   // length of host name
  385.     INTERNET_PORT nPort;        // converted port number
  386.     LPSTR   lpszUserName;       // pointer to user name
  387.     DWORD   dwUserNameLength;   // length of user name
  388.     LPSTR   lpszPassword;       // pointer to password
  389.     DWORD   dwPasswordLength;   // length of password
  390.     LPSTR   lpszUrlPath;        // pointer to URL-path
  391.     DWORD   dwUrlPathLength;    // length of URL-path
  392.     LPSTR   lpszExtraInfo;      // pointer to extra information (e.g. ?foo or #foo)
  393.     DWORD   dwExtraInfoLength;  // length of extra information
  394. } URL_COMPONENTSA, * LPURL_COMPONENTSA;
  395. typedef struct {
  396.     DWORD   dwStructSize;       // size of this structure. Used in version check
  397.     LPWSTR  lpszScheme;         // pointer to scheme name
  398.     DWORD   dwSchemeLength;     // length of scheme name
  399.     INTERNET_SCHEME nScheme;    // enumerated scheme type (if known)
  400.     LPWSTR  lpszHostName;       // pointer to host name
  401.     DWORD   dwHostNameLength;   // length of host name
  402.     INTERNET_PORT nPort;        // converted port number
  403.     LPWSTR  lpszUserName;       // pointer to user name
  404.     DWORD   dwUserNameLength;   // length of user name
  405.     LPWSTR  lpszPassword;       // pointer to password
  406.     DWORD   dwPasswordLength;   // length of password
  407.     LPWSTR  lpszUrlPath;        // pointer to URL-path
  408.     DWORD   dwUrlPathLength;    // length of URL-path
  409.     LPWSTR  lpszExtraInfo;      // pointer to extra information (e.g. ?foo or #foo)
  410.     DWORD   dwExtraInfoLength;  // length of extra information
  411. } URL_COMPONENTSW, * LPURL_COMPONENTSW;
  412. #ifdef UNICODE
  413. typedef URL_COMPONENTSW URL_COMPONENTS;
  414. typedef LPURL_COMPONENTSW LPURL_COMPONENTS;
  415. #else
  416. typedef URL_COMPONENTSA URL_COMPONENTS;
  417. typedef LPURL_COMPONENTSA LPURL_COMPONENTS;
  418. #endif // UNICODE
  419.  
  420. //
  421. // INTERNET_CERTIFICATE_INFO lpBuffer - contains the certificate returned from
  422. // the server
  423. //
  424.  
  425. typedef struct {
  426.  
  427.     //
  428.     // ftExpiry - date the certificate expires.
  429.     //
  430.  
  431.     FILETIME ftExpiry;
  432.  
  433.     //
  434.     // ftStart - date the certificate becomes valid.
  435.     //
  436.  
  437.     FILETIME ftStart;
  438.  
  439.     //
  440.     // lpszSubjectInfo - the name of organization, site, and server
  441.     //   the cert. was issued for.
  442.     //
  443.  
  444.     LPWSTR lpszSubjectInfo;
  445.  
  446.     //
  447.     // lpszIssuerInfo - the name of orgainzation, site, and server
  448.     //   the cert was issues by.
  449.     //
  450.  
  451.     LPWSTR lpszIssuerInfo;
  452.  
  453.     //
  454.     // lpszProtocolName - the name of the protocol used to provide the secure
  455.     //   connection.
  456.     //
  457.  
  458.     LPWSTR lpszProtocolName;
  459.  
  460.     //
  461.     // lpszSignatureAlgName - the name of the algorithm used for signing
  462.     //  the certificate.
  463.     //
  464.  
  465.     LPWSTR lpszSignatureAlgName;
  466.  
  467.     //
  468.     // lpszEncryptionAlgName - the name of the algorithm used for
  469.     //  doing encryption over the secure channel (SSL/PCT) connection.
  470.     //
  471.  
  472.     LPWSTR lpszEncryptionAlgName;
  473.  
  474.     //
  475.     // dwKeySize - size of the key.
  476.     //
  477.  
  478.     DWORD dwKeySize;
  479.  
  480. } INTERNET_CERTIFICATE_INFOW, * LPINTERNET_CERTIFICATE_INFOW;
  481.  
  482. typedef struct {
  483.  
  484.     //
  485.     // ftExpiry - date the certificate expires.
  486.     //
  487.  
  488.     FILETIME ftExpiry;
  489.  
  490.     //
  491.     // ftStart - date the certificate becomes valid.
  492.     //
  493.  
  494.     FILETIME ftStart;
  495.  
  496.     //
  497.     // lpszSubjectInfo - the name of organization, site, and server
  498.     //   the cert. was issued for.
  499.     //
  500.  
  501.     LPSTR lpszSubjectInfo;
  502.  
  503.     //
  504.     // lpszIssuerInfo - the name of orgainzation, site, and server
  505.     //   the cert was issues by.
  506.     //
  507.  
  508.     LPSTR lpszIssuerInfo;
  509.  
  510.     //
  511.     // lpszProtocolName - the name of the protocol used to provide the secure
  512.     //   connection.
  513.     //
  514.  
  515.     LPSTR lpszProtocolName;
  516.  
  517.     //
  518.     // lpszSignatureAlgName - the name of the algorithm used for signing
  519.     //  the certificate.
  520.     //
  521.  
  522.     LPSTR lpszSignatureAlgName;
  523.  
  524.     //
  525.     // lpszEncryptionAlgName - the name of the algorithm used for
  526.     //  doing encryption over the secure channel (SSL/PCT) connection.
  527.     //
  528.  
  529.     LPSTR lpszEncryptionAlgName;
  530.  
  531.     //
  532.     // dwKeySize - size of the key.
  533.     //
  534.  
  535.     DWORD dwKeySize;
  536.  
  537. } INTERNET_CERTIFICATE_INFOA, * LPINTERNET_CERTIFICATE_INFOA;
  538.  
  539. #ifdef UNICODE
  540.     typedef INTERNET_CERTIFICATE_INFOW INTERNET_CERTIFICATE_INFO;
  541.     typedef LPINTERNET_CERTIFICATE_INFOW LPINTERNET_CERTIFICATE_INFO;
  542. #else
  543.     typedef INTERNET_CERTIFICATE_INFOA INTERNET_CERTIFICATE_INFO;
  544.     typedef LPINTERNET_CERTIFICATE_INFOA LPINTERNET_CERTIFICATE_INFO;
  545. #endif //UNICODE
  546.  
  547. //
  548. // prototypes
  549. //
  550.  
  551. INTERNETAPI
  552. BOOL
  553. WINAPI
  554. InternetTimeFromSystemTimeA(
  555.     IN  CONST SYSTEMTIME *pst,  // input GMT time
  556.     IN  DWORD dwRFC,            // RFC format
  557.     OUT LPSTR lpszTime,         // output string buffer
  558.     IN  DWORD cbTime            // output buffer size
  559.     );
  560. INTERNETAPI
  561. BOOL
  562. WINAPI
  563. InternetTimeFromSystemTimeW(
  564.     IN  CONST SYSTEMTIME *pst,  // input GMT time
  565.     IN  DWORD dwRFC,            // RFC format
  566.     OUT LPWSTR lpszTime,        // output string buffer
  567.     IN  DWORD cbTime            // output buffer size
  568.     );
  569. #ifdef UNICODE
  570. #define InternetTimeFromSystemTime    InternetTimeFromSystemTimeW
  571. #else
  572. #define InternetTimeFromSystemTime    InternetTimeFromSystemTimeA
  573. #endif // !UNICODE
  574.  
  575.  
  576. //
  577. // constants for InternetTimeFromSystemTime
  578. //
  579.  
  580. #define INTERNET_RFC1123_FORMAT     0
  581. #define INTERNET_RFC1123_BUFSIZE   30
  582.  
  583. INTERNETAPI
  584. BOOL
  585. WINAPI
  586. InternetTimeToSystemTimeA(
  587.     IN  LPCSTR lpszTime,         // NULL terminated string
  588.     OUT SYSTEMTIME *pst,         // output in GMT time
  589.     IN  DWORD dwReserved
  590.     );
  591.  
  592. INTERNETAPI
  593. BOOL
  594. WINAPI
  595. InternetTimeToSystemTimeW(
  596.     IN  LPCWSTR lpszTime,         // NULL terminated string
  597.     OUT SYSTEMTIME *pst,         // output in GMT time
  598.     IN  DWORD dwReserved
  599.     );
  600.  
  601. #ifdef UNICODE
  602. #define InternetTimeToSystemTime    InternetTimeToSystemTimeW
  603. #else
  604. #define InternetTimeToSystemTime    InternetTimeToSystemTimeA
  605. #endif // !UNICODE
  606.  
  607. INTERNETAPI
  608. BOOL
  609. WINAPI
  610. InternetDebugGetLocalTime(
  611.     OUT SYSTEMTIME * pstLocalTime,
  612.     OUT DWORD      * pdwReserved
  613. );
  614.  
  615. INTERNETAPI
  616. BOOL
  617. WINAPI
  618. InternetCrackUrlA(
  619.     IN LPCSTR lpszUrl,
  620.     IN DWORD dwUrlLength,
  621.     IN DWORD dwFlags,
  622.     IN OUT LPURL_COMPONENTSA lpUrlComponents
  623.     );
  624. INTERNETAPI
  625. BOOL
  626. WINAPI
  627. InternetCrackUrlW(
  628.     IN LPCWSTR lpszUrl,
  629.     IN DWORD dwUrlLength,
  630.     IN DWORD dwFlags,
  631.     IN OUT LPURL_COMPONENTSW lpUrlComponents
  632.     );
  633. #ifdef UNICODE
  634. #define InternetCrackUrl  InternetCrackUrlW
  635. #else
  636. #define InternetCrackUrl  InternetCrackUrlA
  637. #endif // !UNICODE
  638.  
  639. INTERNETAPI
  640. BOOL
  641. WINAPI
  642. InternetCreateUrlA(
  643.     IN LPURL_COMPONENTSA lpUrlComponents,
  644.     IN DWORD dwFlags,
  645.     OUT LPSTR lpszUrl,
  646.     IN OUT LPDWORD lpdwUrlLength
  647.     );
  648. INTERNETAPI
  649. BOOL
  650. WINAPI
  651. InternetCreateUrlW(
  652.     IN LPURL_COMPONENTSW lpUrlComponents,
  653.     IN DWORD dwFlags,
  654.     OUT LPWSTR lpszUrl,
  655.     IN OUT LPDWORD lpdwUrlLength
  656.     );
  657. #ifdef UNICODE
  658. #define InternetCreateUrl  InternetCreateUrlW
  659. #else
  660. #define InternetCreateUrl  InternetCreateUrlA
  661. #endif // !UNICODE
  662.  
  663. INTERNETAPI
  664. BOOL
  665. WINAPI
  666. InternetCanonicalizeUrlA(
  667.     IN LPCSTR lpszUrl,
  668.     OUT LPSTR lpszBuffer,
  669.     IN OUT LPDWORD lpdwBufferLength,
  670.     IN DWORD dwFlags
  671.     );
  672. INTERNETAPI
  673. BOOL
  674. WINAPI
  675. InternetCanonicalizeUrlW(
  676.     IN LPCWSTR lpszUrl,
  677.     OUT LPWSTR lpszBuffer,
  678.     IN OUT LPDWORD lpdwBufferLength,
  679.     IN DWORD dwFlags
  680.     );
  681. #ifdef UNICODE
  682. #define InternetCanonicalizeUrl  InternetCanonicalizeUrlW
  683. #else
  684. #define InternetCanonicalizeUrl  InternetCanonicalizeUrlA
  685. #endif // !UNICODE
  686.  
  687. INTERNETAPI
  688. BOOL
  689. WINAPI
  690. InternetCombineUrlA(
  691.     IN LPCSTR lpszBaseUrl,
  692.     IN LPCSTR lpszRelativeUrl,
  693.     OUT LPSTR lpszBuffer,
  694.     IN OUT LPDWORD lpdwBufferLength,
  695.     IN DWORD dwFlags
  696.     );
  697. INTERNETAPI
  698. BOOL
  699. WINAPI
  700. InternetCombineUrlW(
  701.     IN LPCWSTR lpszBaseUrl,
  702.     IN LPCWSTR lpszRelativeUrl,
  703.     OUT LPWSTR lpszBuffer,
  704.     IN OUT LPDWORD lpdwBufferLength,
  705.     IN DWORD dwFlags
  706.     );
  707. #ifdef UNICODE
  708. #define InternetCombineUrl  InternetCombineUrlW
  709. #else
  710. #define InternetCombineUrl  InternetCombineUrlA
  711. #endif // !UNICODE
  712.  
  713. //
  714. // flags for InternetCrackUrl() and InternetCreateUrl()
  715. //
  716.  
  717. #define ICU_ESCAPE      0x80000000  // (un)escape URL characters
  718. #define ICU_USERNAME    0x40000000  // use internal username & password
  719.  
  720. //
  721. // flags for InternetCanonicalizeUrl() and InternetCombineUrl()
  722. //
  723.  
  724. #define ICU_NO_ENCODE   0x20000000  // Don't convert unsafe characters to escape sequence
  725. #define ICU_DECODE      0x10000000  // Convert %XX escape sequences to characters
  726. #define ICU_NO_META     0x08000000  // Don't convert .. etc. meta path sequences
  727. #define ICU_ENCODE_SPACES_ONLY 0x04000000  // Encode spaces only
  728. #define ICU_BROWSER_MODE 0x02000000 // Special encode/decode rules for browser
  729.  
  730. INTERNETAPI
  731. HINTERNET
  732. WINAPI
  733. InternetOpenA(
  734.     IN LPCSTR lpszAgent,
  735.     IN DWORD dwAccessType,
  736.     IN LPCSTR lpszProxy OPTIONAL,
  737.     IN LPCSTR lpszProxyBypass OPTIONAL,
  738.     IN DWORD dwFlags
  739.     );
  740. INTERNETAPI
  741. HINTERNET
  742. WINAPI
  743. InternetOpenW(
  744.     IN LPCWSTR lpszAgent,
  745.     IN DWORD dwAccessType,
  746.     IN LPCWSTR lpszProxy OPTIONAL,
  747.     IN LPCWSTR lpszProxyBypass OPTIONAL,
  748.     IN DWORD dwFlags
  749.     );
  750. #ifdef UNICODE
  751. #define InternetOpen  InternetOpenW
  752. #else
  753. #define InternetOpen  InternetOpenA
  754. #endif // !UNICODE
  755.  
  756. //
  757. // access types for InternetOpen()
  758. //
  759.  
  760. #define INTERNET_OPEN_TYPE_PRECONFIG    0   // use registry configuration
  761. #define INTERNET_OPEN_TYPE_DIRECT       1   // direct to net
  762. #define INTERNET_OPEN_TYPE_PROXY        3   // via named proxy
  763.  
  764. #define PRE_CONFIG_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PRECONFIG
  765. #define LOCAL_INTERNET_ACCESS       INTERNET_OPEN_TYPE_DIRECT
  766. #define GATEWAY_INTERNET_ACCESS     2   // Internet via gateway
  767. #define CERN_PROXY_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PROXY
  768.  
  769. INTERNETAPI
  770. BOOL
  771. WINAPI
  772. InternetCloseHandle(
  773.     IN HINTERNET hInternet
  774.     );
  775.  
  776. INTERNETAPI
  777. HINTERNET
  778. WINAPI
  779. InternetConnectA(
  780.     IN HINTERNET hInternet,
  781.     IN LPCSTR lpszServerName,
  782.     IN INTERNET_PORT nServerPort,
  783.     IN LPCSTR lpszUserName OPTIONAL,
  784.     IN LPCSTR lpszPassword OPTIONAL,
  785.     IN DWORD dwService,
  786.     IN DWORD dwFlags,
  787.     IN DWORD dwContext
  788.     );
  789. INTERNETAPI
  790. HINTERNET
  791. WINAPI
  792. InternetConnectW(
  793.     IN HINTERNET hInternet,
  794.     IN LPCWSTR lpszServerName,
  795.     IN INTERNET_PORT nServerPort,
  796.     IN LPCWSTR lpszUserName OPTIONAL,
  797.     IN LPCWSTR lpszPassword OPTIONAL,
  798.     IN DWORD dwService,
  799.     IN DWORD dwFlags,
  800.     IN DWORD dwContext
  801.     );
  802. #ifdef UNICODE
  803. #define InternetConnect  InternetConnectW
  804. #else
  805. #define InternetConnect  InternetConnectA
  806. #endif // !UNICODE
  807.  
  808. //
  809. // service types for InternetConnect()
  810. //
  811.  
  812. #define INTERNET_SERVICE_FTP    1
  813. #define INTERNET_SERVICE_HTTP   3
  814.  
  815. INTERNETAPI
  816. HINTERNET
  817. WINAPI
  818. InternetOpenUrlA(
  819.     IN HINTERNET hInternet,
  820.     IN LPCSTR lpszUrl,
  821.     IN LPCSTR lpszHeaders OPTIONAL,
  822.     IN DWORD dwHeadersLength,
  823.     IN DWORD dwFlags,
  824.     IN DWORD dwContext
  825.     );
  826. INTERNETAPI
  827. HINTERNET
  828. WINAPI
  829. InternetOpenUrlW(
  830.     IN HINTERNET hInternet,
  831.     IN LPCWSTR lpszUrl,
  832.     IN LPCWSTR lpszHeaders OPTIONAL,
  833.     IN DWORD dwHeadersLength,
  834.     IN DWORD dwFlags,
  835.     IN DWORD dwContext
  836.     );
  837. #ifdef UNICODE
  838. #define InternetOpenUrl  InternetOpenUrlW
  839. #else
  840. #define InternetOpenUrl  InternetOpenUrlA
  841. #endif // !UNICODE
  842.  
  843. INTERNETAPI
  844. BOOL
  845. WINAPI
  846. InternetReadFile(
  847.     IN HINTERNET hFile,
  848.     IN LPVOID lpBuffer,
  849.     IN DWORD dwNumberOfBytesToRead,
  850.     OUT LPDWORD lpdwNumberOfBytesRead
  851.     );
  852.  
  853. INTERNETAPI
  854. DWORD
  855. WINAPI
  856. InternetSetFilePointer(
  857.     IN HINTERNET hFile,
  858.     IN LONG  lDistanceToMove,
  859.     IN PVOID pReserved,
  860.     IN DWORD dwMoveMethod,
  861.     IN DWORD dwContext
  862.     );
  863.  
  864. INTERNETAPI
  865. BOOL
  866. WINAPI
  867. InternetWriteFile(
  868.     IN HINTERNET hFile,
  869.     IN LPCVOID lpBuffer,
  870.     IN DWORD dwNumberOfBytesToWrite,
  871.     OUT LPDWORD lpdwNumberOfBytesWritten
  872.     );
  873.  
  874. INTERNETAPI
  875. BOOL
  876. WINAPI
  877. InternetQueryDataAvailable(
  878.     IN HINTERNET hFile,
  879.     OUT LPDWORD lpdwNumberOfBytesAvailable,
  880.     IN DWORD dwFlags,
  881.     IN DWORD dwContext
  882.     );
  883.  
  884. INTERNETAPI
  885. BOOL
  886. WINAPI
  887. InternetFindNextFileA(
  888.     IN HINTERNET hFind,
  889.     OUT LPVOID lpvFindData
  890.     );
  891. INTERNETAPI
  892. BOOL
  893. WINAPI
  894. InternetFindNextFileW(
  895.     IN HINTERNET hFind,
  896.     OUT LPVOID lpvFindData
  897.     );
  898. #ifdef UNICODE
  899. #define InternetFindNextFile  InternetFindNextFileW
  900. #else
  901. #define InternetFindNextFile  InternetFindNextFileA
  902. #endif // !UNICODE
  903.  
  904. INTERNETAPI
  905. BOOL
  906. WINAPI
  907. InternetQueryOptionA(
  908.     IN HINTERNET hInternet OPTIONAL,
  909.     IN DWORD dwOption,
  910.     OUT LPVOID lpBuffer OPTIONAL,
  911.     IN OUT LPDWORD lpdwBufferLength
  912.     );
  913. INTERNETAPI
  914. BOOL
  915. WINAPI
  916. InternetQueryOptionW(
  917.     IN HINTERNET hInternet OPTIONAL,
  918.     IN DWORD dwOption,
  919.     OUT LPVOID lpBuffer OPTIONAL,
  920.     IN OUT LPDWORD lpdwBufferLength
  921.     );
  922. #ifdef UNICODE
  923. #define InternetQueryOption  InternetQueryOptionW
  924. #else
  925. #define InternetQueryOption  InternetQueryOptionA
  926. #endif // !UNICODE
  927.  
  928. INTERNETAPI
  929. BOOL
  930. WINAPI
  931. InternetSetOptionA(
  932.     IN HINTERNET hInternet OPTIONAL,
  933.     IN DWORD dwOption,
  934.     IN LPVOID lpBuffer,
  935.     IN DWORD dwBufferLength
  936.     );
  937. INTERNETAPI
  938. BOOL
  939. WINAPI
  940. InternetSetOptionW(
  941.     IN HINTERNET hInternet OPTIONAL,
  942.     IN DWORD dwOption,
  943.     IN LPVOID lpBuffer,
  944.     IN DWORD dwBufferLength
  945.     );
  946. #ifdef UNICODE
  947. #define InternetSetOption  InternetSetOptionW
  948. #else
  949. #define InternetSetOption  InternetSetOptionA
  950. #endif // !UNICODE
  951.  
  952. INTERNETAPI
  953. BOOL
  954. WINAPI
  955. InternetSetOptionExA(
  956.     IN HINTERNET hInternet OPTIONAL,
  957.     IN DWORD dwOption,
  958.     IN LPVOID lpBuffer,
  959.     IN DWORD dwBufferLength,
  960.     IN DWORD dwFlags
  961.     );
  962. INTERNETAPI
  963. BOOL
  964. WINAPI
  965. InternetSetOptionExW(
  966.     IN HINTERNET hInternet OPTIONAL,
  967.     IN DWORD dwOption,
  968.     IN LPVOID lpBuffer,
  969.     IN DWORD dwBufferLength,
  970.     IN DWORD dwFlags
  971.     );
  972. #ifdef UNICODE
  973. #define InternetSetOptionEx  InternetSetOptionExW
  974. #else
  975. #define InternetSetOptionEx  InternetSetOptionExA
  976. #endif // !UNICODE
  977.  
  978. //
  979. // flags for InternetSetOptionEx()
  980. //
  981.  
  982. #define ISO_GLOBAL      0x00000001  // modify option globally
  983. #define ISO_REGISTRY    0x00000002  // write option to registry (where applicable)
  984.  
  985. #define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
  986.  
  987. //
  988. // options manifests for Internet{Query|Set}Option
  989. //
  990.  
  991. #define INTERNET_OPTION_CALLBACK                1
  992. #define INTERNET_OPTION_CONNECT_TIMEOUT         2
  993. #define INTERNET_OPTION_CONNECT_RETRIES         3
  994. #define INTERNET_OPTION_CONNECT_BACKOFF         4
  995. #define INTERNET_OPTION_SEND_TIMEOUT            5
  996. #define INTERNET_OPTION_CONTROL_SEND_TIMEOUT    INTERNET_OPTION_SEND_TIMEOUT
  997. #define INTERNET_OPTION_RECEIVE_TIMEOUT         6
  998. #define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT INTERNET_OPTION_RECEIVE_TIMEOUT
  999. #define INTERNET_OPTION_DATA_SEND_TIMEOUT       7
  1000. #define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT    8
  1001. #define INTERNET_OPTION_HANDLE_TYPE             9
  1002. #define INTERNET_OPTION_CONTEXT_VALUE           10
  1003. #define INTERNET_OPTION_LISTEN_TIMEOUT          11
  1004. #define INTERNET_OPTION_READ_BUFFER_SIZE        12
  1005. #define INTERNET_OPTION_WRITE_BUFFER_SIZE       13
  1006.  
  1007. #define INTERNET_OPTION_ASYNC_ID                15
  1008. #define INTERNET_OPTION_ASYNC_PRIORITY          16
  1009.  
  1010. #define INTERNET_OPTION_PARENT_HANDLE           21
  1011. #define INTERNET_OPTION_KEEP_CONNECTION         22
  1012. #define INTERNET_OPTION_REQUEST_FLAGS           23
  1013. #define INTERNET_OPTION_EXTENDED_ERROR          24
  1014.  
  1015. #define INTERNET_OPTION_OFFLINE_MODE            26
  1016. #define INTERNET_OPTION_CACHE_STREAM_HANDLE     27
  1017. #define INTERNET_OPTION_USERNAME                28
  1018. #define INTERNET_OPTION_PASSWORD                29
  1019. #define INTERNET_OPTION_ASYNC                   30
  1020. #define INTERNET_OPTION_SECURITY_FLAGS          31
  1021. #define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT    32
  1022. #define INTERNET_OPTION_DATAFILE_NAME           33
  1023. #define INTERNET_OPTION_URL                     34
  1024. #define INTERNET_OPTION_SECURITY_CERTIFICATE    35
  1025. #define INTERNET_OPTION_SECURITY_KEY_BITNESS    36
  1026. #define INTERNET_OPTION_REFRESH                 37
  1027. #define INTERNET_OPTION_PROXY                   38
  1028. #define INTERNET_OPTION_SETTINGS_CHANGED        39
  1029. #define INTERNET_OPTION_VERSION                 40
  1030. #define INTERNET_OPTION_USER_AGENT              41
  1031.  
  1032. #define INTERNET_FIRST_OPTION                   INTERNET_OPTION_CALLBACK
  1033. #define INTERNET_LAST_OPTION                    INTERNET_OPTION_USER_AGENT
  1034.  
  1035. //
  1036. // values for INTERNET_OPTION_PRIORITY
  1037. //
  1038.  
  1039. #define INTERNET_PRIORITY_FOREGROUND            1000
  1040.  
  1041. //
  1042. // handle types
  1043. //
  1044.  
  1045. #define INTERNET_HANDLE_TYPE_INTERNET           1
  1046. #define INTERNET_HANDLE_TYPE_CONNECT_FTP        2
  1047. #define INTERNET_HANDLE_TYPE_CONNECT_HTTP       4
  1048. #define INTERNET_HANDLE_TYPE_FTP_FIND           5
  1049. #define INTERNET_HANDLE_TYPE_FTP_FIND_HTML      6
  1050. #define INTERNET_HANDLE_TYPE_FTP_FILE           7
  1051. #define INTERNET_HANDLE_TYPE_FTP_FILE_HTML      8
  1052. #define INTERNET_HANDLE_TYPE_HTTP_REQUEST       13
  1053.  
  1054. //
  1055. // values for INTERNET_OPTION_SECURITY_FLAGS
  1056. //
  1057.  
  1058. #define SECURITY_FLAG_SECURE                    0x00000001 // can query only
  1059. #define SECURITY_FLAG_SSL                       0x00000002
  1060. #define SECURITY_FLAG_SSL3                      0x00000004
  1061. #define SECURITY_FLAG_PCT                       0x00000008
  1062. #define SECURITY_FLAG_PCT4                      0x00000010
  1063. #define SECURITY_FLAG_IETFSSL4                  0x00000020
  1064.  
  1065. #define SECURITY_FLAG_40BIT                     0x10000000
  1066. #define SECURITY_FLAG_128BIT                    0x20000000
  1067. #define SECURITY_FLAG_56BIT                     0x40000000
  1068. #define SECURITY_FLAG_UNKNOWNBIT                0x80000000
  1069. #define SECURITY_FLAG_NORMALBITNESS             SECURITY_FLAG_40BIT
  1070.  
  1071. #define SECURITY_FLAG_IGNORE_CERT_CN_INVALID    INTERNET_FLAG_IGNORE_CERT_CN_INVALID
  1072. #define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID  INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
  1073. #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
  1074. #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP   INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
  1075.  
  1076. INTERNETAPI
  1077. BOOL
  1078. WINAPI
  1079. InternetGetLastResponseInfoA(
  1080.     OUT LPDWORD lpdwError,
  1081.     OUT LPSTR lpszBuffer OPTIONAL,
  1082.     IN OUT LPDWORD lpdwBufferLength
  1083.     );
  1084. INTERNETAPI
  1085. BOOL
  1086. WINAPI
  1087. InternetGetLastResponseInfoW(
  1088.     OUT LPDWORD lpdwError,
  1089.     OUT LPWSTR lpszBuffer OPTIONAL,
  1090.     IN OUT LPDWORD lpdwBufferLength
  1091.     );
  1092. #ifdef UNICODE
  1093. #define InternetGetLastResponseInfo  InternetGetLastResponseInfoW
  1094. #else
  1095. #define InternetGetLastResponseInfo  InternetGetLastResponseInfoA
  1096. #endif // !UNICODE
  1097.  
  1098. //
  1099. // callback function for InternetSetStatusCallback
  1100. //
  1101.  
  1102. typedef
  1103. VOID
  1104. (CALLBACK * INTERNET_STATUS_CALLBACK)(
  1105.     IN HINTERNET hInternet,
  1106.     IN DWORD dwContext,
  1107.     IN DWORD dwInternetStatus,
  1108.     IN LPVOID lpvStatusInformation OPTIONAL,
  1109.     IN DWORD dwStatusInformationLength
  1110.     );
  1111.  
  1112. typedef INTERNET_STATUS_CALLBACK * LPINTERNET_STATUS_CALLBACK;
  1113.  
  1114. INTERNETAPI
  1115. INTERNET_STATUS_CALLBACK
  1116. WINAPI
  1117. InternetSetStatusCallback(
  1118.     IN HINTERNET hInternet,
  1119.     IN INTERNET_STATUS_CALLBACK lpfnInternetCallback
  1120.     );
  1121.  
  1122. //
  1123. // status manifests for Internet status callback
  1124. //
  1125.  
  1126. #define INTERNET_STATUS_RESOLVING_NAME          10
  1127. #define INTERNET_STATUS_NAME_RESOLVED           11
  1128. #define INTERNET_STATUS_CONNECTING_TO_SERVER    20
  1129. #define INTERNET_STATUS_CONNECTED_TO_SERVER     21
  1130. #define INTERNET_STATUS_SENDING_REQUEST         30
  1131. #define INTERNET_STATUS_REQUEST_SENT            31
  1132. #define INTERNET_STATUS_RECEIVING_RESPONSE      40
  1133. #define INTERNET_STATUS_RESPONSE_RECEIVED       41
  1134. #define INTERNET_STATUS_CTL_RESPONSE_RECEIVED   42
  1135. #define INTERNET_STATUS_PREFETCH                43
  1136. #define INTERNET_STATUS_CLOSING_CONNECTION      50
  1137. #define INTERNET_STATUS_CONNECTION_CLOSED       51
  1138. #define INTERNET_STATUS_HANDLE_CREATED          60
  1139. #define INTERNET_STATUS_HANDLE_CLOSING          70
  1140. #define INTERNET_STATUS_REQUEST_COMPLETE        100
  1141. #define INTERNET_STATUS_REDIRECT                110
  1142.  
  1143. //
  1144. // if the following value is returned by InternetSetStatusCallback, then
  1145. // probably an invalid (non-code) address was supplied for the callback
  1146. //
  1147.  
  1148. #define INTERNET_INVALID_STATUS_CALLBACK        ((INTERNET_STATUS_CALLBACK)(-1L))
  1149.  
  1150. //
  1151. // FTP
  1152. //
  1153.  
  1154. //
  1155. // manifests
  1156. //
  1157.  
  1158. #define FTP_TRANSFER_TYPE_UNKNOWN   0x00000000
  1159. #define FTP_TRANSFER_TYPE_ASCII     0x00000001
  1160. #define FTP_TRANSFER_TYPE_BINARY    0x00000002
  1161.  
  1162. #define FTP_TRANSFER_TYPE_MASK      (FTP_TRANSFER_TYPE_ASCII | FTP_TRANSFER_TYPE_BINARY)
  1163.  
  1164. // @CESYSGEN IF WININET_INETFTP
  1165. // @CESYSGEN ENDIF
  1166.  
  1167. //
  1168. // HTTP
  1169. //
  1170.  
  1171. //
  1172. // manifests
  1173. //
  1174.  
  1175. //
  1176. // the default major/minor HTTP version numbers
  1177. //
  1178.  
  1179. #define HTTP_MAJOR_VERSION      1
  1180. #define HTTP_MINOR_VERSION      0
  1181.  
  1182. #define HTTP_VERSION            TEXT("HTTP/1.0")
  1183.  
  1184. //
  1185. // HttpQueryInfo info levels. Generally, there is one info level
  1186. // for each potential RFC822/HTTP/MIME header that an HTTP server
  1187. // may send as part of a request response.
  1188. //
  1189. // The HTTP_QUERY_RAW_HEADERS info level is provided for clients
  1190. // that choose to perform their own header parsing.
  1191. //
  1192.  
  1193. #define HTTP_QUERY_MIME_VERSION                 0
  1194. #define HTTP_QUERY_CONTENT_TYPE                 1
  1195. #define HTTP_QUERY_CONTENT_TRANSFER_ENCODING    2
  1196. #define HTTP_QUERY_CONTENT_ID                   3
  1197. #define HTTP_QUERY_CONTENT_DESCRIPTION          4
  1198. #define HTTP_QUERY_CONTENT_LENGTH               5
  1199. #define HTTP_QUERY_CONTENT_LANGUAGE             6
  1200. #define HTTP_QUERY_ALLOW                        7
  1201. #define HTTP_QUERY_PUBLIC                       8
  1202. #define HTTP_QUERY_DATE                         9
  1203. #define HTTP_QUERY_EXPIRES                      10
  1204. #define HTTP_QUERY_LAST_MODIFIED                11
  1205. #define HTTP_QUERY_MESSAGE_ID                   12
  1206. #define HTTP_QUERY_URI                          13
  1207. #define HTTP_QUERY_DERIVED_FROM                 14
  1208. #define HTTP_QUERY_COST                         15
  1209. #define HTTP_QUERY_LINK                         16
  1210. #define HTTP_QUERY_PRAGMA                       17
  1211. #define HTTP_QUERY_VERSION                      18  // special: part of status line
  1212. #define HTTP_QUERY_STATUS_CODE                  19  // special: part of status line
  1213. #define HTTP_QUERY_STATUS_TEXT                  20  // special: part of status line
  1214. #define HTTP_QUERY_RAW_HEADERS                  21  // special: all headers as ASCIIZ
  1215. #define HTTP_QUERY_RAW_HEADERS_CRLF             22  // special: all headers
  1216. #define HTTP_QUERY_CONNECTION                   23
  1217. #define HTTP_QUERY_ACCEPT                       24
  1218. #define HTTP_QUERY_ACCEPT_CHARSET               25
  1219. #define HTTP_QUERY_ACCEPT_ENCODING              26
  1220. #define HTTP_QUERY_ACCEPT_LANGUAGE              27
  1221. #define HTTP_QUERY_AUTHORIZATION                28
  1222. #define HTTP_QUERY_CONTENT_ENCODING             29
  1223. #define HTTP_QUERY_FORWARDED                    30
  1224. #define HTTP_QUERY_FROM                         31
  1225. #define HTTP_QUERY_IF_MODIFIED_SINCE            32
  1226. #define HTTP_QUERY_LOCATION                     33
  1227. #define HTTP_QUERY_ORIG_URI                     34
  1228. #define HTTP_QUERY_REFERER                      35
  1229. #define HTTP_QUERY_RETRY_AFTER                  36
  1230. #define HTTP_QUERY_SERVER                       37
  1231. #define HTTP_QUERY_TITLE                        38
  1232. #define HTTP_QUERY_USER_AGENT                   39
  1233. #define HTTP_QUERY_WWW_AUTHENTICATE             40
  1234. #define HTTP_QUERY_PROXY_AUTHENTICATE           41
  1235. #define HTTP_QUERY_ACCEPT_RANGES                42
  1236. #define HTTP_QUERY_SET_COOKIE                   43
  1237. #define HTTP_QUERY_COOKIE                       44
  1238. #define HTTP_QUERY_REQUEST_METHOD               45  // special: GET/POST etc.
  1239.  
  1240. #define HTTP_QUERY_MAX                          45
  1241.  
  1242. //
  1243. // HTTP_QUERY_CUSTOM - if this special value is supplied as the dwInfoLevel
  1244. // parameter of HttpQueryInfo() then the lpBuffer parameter contains the name
  1245. // of the header we are to query
  1246. //
  1247.  
  1248. #define HTTP_QUERY_CUSTOM                       65535
  1249.  
  1250. //
  1251. // HTTP_QUERY_FLAG_REQUEST_HEADERS - if this bit is set in the dwInfoLevel
  1252. // parameter of HttpQueryInfo() then the request headers will be queried for the
  1253. // request information
  1254. //
  1255.  
  1256. #define HTTP_QUERY_FLAG_REQUEST_HEADERS         0x80000000
  1257.  
  1258. //
  1259. // HTTP_QUERY_FLAG_SYSTEMTIME - if this bit is set in the dwInfoLevel parameter
  1260. // of HttpQueryInfo() AND the header being queried contains date information,
  1261. // e.g. the "Expires:" header then lpBuffer will contain a SYSTEMTIME structure
  1262. // containing the date and time information converted from the header string
  1263. //
  1264.  
  1265. #define HTTP_QUERY_FLAG_SYSTEMTIME              0x40000000
  1266.  
  1267. //
  1268. // HTTP_QUERY_FLAG_NUMBER - if this bit is set in the dwInfoLevel parameter of
  1269. // HttpQueryInfo(), then the value of the header will be converted to a number
  1270. // before being returned to the caller, if applicable
  1271. //
  1272.  
  1273. #define HTTP_QUERY_FLAG_NUMBER                  0x20000000
  1274.  
  1275. //
  1276. // HTTP_QUERY_FLAG_COALESCE - combine the values from several headers of the
  1277. // same name into the output buffer
  1278. //
  1279.  
  1280. #define HTTP_QUERY_FLAG_COALESCE                0x10000000
  1281.  
  1282. #define HTTP_QUERY_MODIFIER_FLAGS_MASK          (HTTP_QUERY_FLAG_REQUEST_HEADERS    \
  1283.                                                 | HTTP_QUERY_FLAG_SYSTEMTIME        \
  1284.                                                 | HTTP_QUERY_FLAG_NUMBER            \
  1285.                                                 | HTTP_QUERY_FLAG_COALESCE          \
  1286.                                                 )
  1287.  
  1288. #define HTTP_QUERY_HEADER_MASK                  (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
  1289.  
  1290. //
  1291. // HTTP Response Status Codes:
  1292. //
  1293.  
  1294. #define HTTP_STATUS_OK              200     // request completed
  1295. #define HTTP_STATUS_CREATED         201     // object created, reason = new URI
  1296. #define HTTP_STATUS_ACCEPTED        202     // async completion (TBS)
  1297. #define HTTP_STATUS_PARTIAL         203     // partial completion
  1298. #define HTTP_STATUS_NO_CONTENT      204     // no info to return
  1299.  
  1300. #define HTTP_STATUS_AMBIGUOUS       300     // server couldn't decide what to return
  1301. #define HTTP_STATUS_MOVED           301     // object permanently moved
  1302. #define HTTP_STATUS_REDIRECT        302     // object temporarily moved
  1303. #define HTTP_STATUS_REDIRECT_METHOD 303     // redirection w/ new access method
  1304. #define HTTP_STATUS_NOT_MODIFIED    304     // if-modified-since was not modified
  1305.  
  1306. #define HTTP_STATUS_BAD_REQUEST     400     // invalid syntax
  1307. #define HTTP_STATUS_DENIED          401     // access denied
  1308. #define HTTP_STATUS_PAYMENT_REQ     402     // payment required
  1309. #define HTTP_STATUS_FORBIDDEN       403     // request forbidden
  1310. #define HTTP_STATUS_NOT_FOUND       404     // object not found
  1311. #define HTTP_STATUS_BAD_METHOD      405     // method is not allowed
  1312. #define HTTP_STATUS_NONE_ACCEPTABLE 406     // no response acceptable to client found
  1313. #define HTTP_STATUS_PROXY_AUTH_REQ  407     // proxy authentication required
  1314. #define HTTP_STATUS_REQUEST_TIMEOUT 408     // server timed out waiting for request
  1315. #define HTTP_STATUS_CONFLICT        409     // user should resubmit with more info
  1316. #define HTTP_STATUS_GONE            410     // the resource is no longer available
  1317. #define HTTP_STATUS_AUTH_REFUSED    411     // couldn't authorize client
  1318.  
  1319. #define HTTP_STATUS_SERVER_ERROR    500     // internal server error
  1320. #define HTTP_STATUS_NOT_SUPPORTED   501     // required not supported
  1321. #define HTTP_STATUS_BAD_GATEWAY     502     // error response received from gateway
  1322. #define HTTP_STATUS_SERVICE_UNAVAIL 503     // temporarily overloaded
  1323. #define HTTP_STATUS_GATEWAY_TIMEOUT 504     // timed out waiting for gateway
  1324.  
  1325. //
  1326. // prototypes
  1327. //
  1328.  
  1329. INTERNETAPI
  1330. HINTERNET
  1331. WINAPI
  1332. HttpOpenRequestA(
  1333.     IN HINTERNET hConnect,
  1334.     IN LPCSTR lpszVerb,
  1335.     IN LPCSTR lpszObjectName,
  1336.     IN LPCSTR lpszVersion,
  1337.     IN LPCSTR lpszReferrer OPTIONAL,
  1338.     IN LPCSTR FAR * lplpszAcceptTypes OPTIONAL,
  1339.     IN DWORD dwFlags,
  1340.     IN DWORD dwContext
  1341.     );
  1342. INTERNETAPI
  1343. HINTERNET
  1344. WINAPI
  1345. HttpOpenRequestW(
  1346.     IN HINTERNET hConnect,
  1347.     IN LPCWSTR lpszVerb,
  1348.     IN LPCWSTR lpszObjectName,
  1349.     IN LPCWSTR lpszVersion,
  1350.     IN LPCWSTR lpszReferrer OPTIONAL,
  1351.     IN LPCWSTR FAR * lplpszAcceptTypes OPTIONAL,
  1352.     IN DWORD dwFlags,
  1353.     IN DWORD dwContext
  1354.     );
  1355. #ifdef UNICODE
  1356. #define HttpOpenRequest  HttpOpenRequestW
  1357. #else
  1358. #define HttpOpenRequest  HttpOpenRequestA
  1359. #endif // !UNICODE
  1360.  
  1361. INTERNETAPI
  1362. BOOL
  1363. WINAPI
  1364. HttpAddRequestHeadersA(
  1365.     IN HINTERNET hRequest,
  1366.     IN LPCSTR lpszHeaders,
  1367.     IN DWORD dwHeadersLength,
  1368.     IN DWORD dwModifiers
  1369.     );
  1370. INTERNETAPI
  1371. BOOL
  1372. WINAPI
  1373. HttpAddRequestHeadersW(
  1374.     IN HINTERNET hRequest,
  1375.     IN LPCWSTR lpszHeaders,
  1376.     IN DWORD dwHeadersLength,
  1377.     IN DWORD dwModifiers
  1378.     );
  1379. #ifdef UNICODE
  1380. #define HttpAddRequestHeaders  HttpAddRequestHeadersW
  1381. #else
  1382. #define HttpAddRequestHeaders  HttpAddRequestHeadersA
  1383. #endif // !UNICODE
  1384.  
  1385. //
  1386. // values for dwModifiers parameter of HttpAddRequestHeaders()
  1387. //
  1388.  
  1389. #define HTTP_ADDREQ_INDEX_MASK      0x0000FFFF
  1390. #define HTTP_ADDREQ_FLAGS_MASK      0xFFFF0000
  1391.  
  1392. //
  1393. // HTTP_ADDREQ_FLAG_ADD_IF_NEW - the header will only be added if it doesn't
  1394. // already exist
  1395. //
  1396.  
  1397. #define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
  1398.  
  1399. //
  1400. // HTTP_ADDREQ_FLAG_ADD - if HTTP_ADDREQ_FLAG_REPLACE is set but the header is
  1401. // not found then if this flag is set, the header is added anyway, so long as
  1402. // there is a valid header-value
  1403. //
  1404.  
  1405. #define HTTP_ADDREQ_FLAG_ADD        0x20000000
  1406.  
  1407. //
  1408. // HTTP_ADDREQ_FLAG_COALESCE - coalesce headers with same name. e.g.
  1409. // "Accept: text/*" and "Accept: audio/*" with this flag results in a single
  1410. // header: "Accept: text/*, audio/*"
  1411. //
  1412.  
  1413. //
  1414. // HTTP_ADDREQ_FLAG_COALESCE - coalesce headers with same name. e.g.
  1415. // "Accept: text/*" and "Accept: audio/*" with this flag results in a single
  1416. // header: "Accept: text/*, audio/*"
  1417. //
  1418.  
  1419. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA       0x40000000
  1420.  
  1421. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON   0x01000000
  1422.  
  1423. #define HTTP_ADDREQ_FLAG_COALESCE                  HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
  1424.  
  1425. //
  1426. // HTTP_ADDREQ_FLAG_REPLACE - replaces the specified header. Only one header can
  1427. // be supplied in the buffer. If the header to be replaced is not the first
  1428. // in a list of headers with the same name, then the relative index should be
  1429. // supplied in the low 8 bits of the dwModifiers parameter. If the header-value
  1430. // part is missing, then the header is removed
  1431. //
  1432.  
  1433. #define HTTP_ADDREQ_FLAG_REPLACE    0x80000000
  1434.  
  1435. INTERNETAPI
  1436. BOOL
  1437. WINAPI
  1438. HttpSendRequestA(
  1439.     IN HINTERNET hRequest,
  1440.     IN LPCSTR lpszHeaders OPTIONAL,
  1441.     IN DWORD dwHeadersLength,
  1442.     IN LPVOID lpOptional OPTIONAL,
  1443.     IN DWORD dwOptionalLength
  1444.     );
  1445. INTERNETAPI
  1446. BOOL
  1447. WINAPI
  1448. HttpSendRequestW(
  1449.     IN HINTERNET hRequest,
  1450.     IN LPCWSTR lpszHeaders OPTIONAL,
  1451.     IN DWORD dwHeadersLength,
  1452.     IN LPVOID lpOptional OPTIONAL,
  1453.     IN DWORD dwOptionalLength
  1454.     );
  1455. #ifdef UNICODE
  1456. #define HttpSendRequest  HttpSendRequestW
  1457. #else
  1458. #define HttpSendRequest  HttpSendRequestA
  1459. #endif // !UNICODE
  1460.  
  1461. INTERNETAPI
  1462. BOOL
  1463. WINAPI
  1464. HttpQueryInfoA(
  1465.     IN HINTERNET hRequest,
  1466.     IN DWORD dwInfoLevel,
  1467.     IN OUT LPVOID lpBuffer OPTIONAL,
  1468.     IN OUT LPDWORD lpdwBufferLength,
  1469.     IN OUT LPDWORD lpdwIndex OPTIONAL
  1470.     );
  1471. INTERNETAPI
  1472. BOOL
  1473. WINAPI
  1474. HttpQueryInfoW(
  1475.     IN HINTERNET hRequest,
  1476.     IN DWORD dwInfoLevel,
  1477.     IN OUT LPVOID lpBuffer OPTIONAL,
  1478.     IN OUT LPDWORD lpdwBufferLength,
  1479.     IN OUT LPDWORD lpdwIndex OPTIONAL
  1480.     );
  1481. #ifdef UNICODE
  1482. #define HttpQueryInfo  HttpQueryInfoW
  1483. #else
  1484. #define HttpQueryInfo  HttpQueryInfoA
  1485. #endif // !UNICODE
  1486.  
  1487. //
  1488. // offline browsing
  1489. //
  1490.  
  1491. INTERNETAPI
  1492. DWORD
  1493. WINAPI
  1494. InternetAttemptConnect(
  1495.     DWORD dwReserved
  1496.     );
  1497.  
  1498. //
  1499. // Internet UI
  1500. //
  1501.  
  1502. //
  1503. // InternetErrorDlg - Provides UI for certain Errors.
  1504. //
  1505.  
  1506. #define FLAGS_ERROR_UI_FILTER_FOR_ERRORS        0x01
  1507. #define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS     0x02
  1508. #define FLAGS_ERROR_UI_FLAGS_GENERATE_DATA      0x04
  1509. #define FLAGS_ERROR_UI_FLAGS_NO_UI              0x08
  1510.  
  1511. INTERNETAPI
  1512. DWORD
  1513. WINAPI
  1514. InternetErrorDlg(
  1515.      IN HWND hWnd,
  1516.      IN OUT HINTERNET hRequest,
  1517.      IN DWORD dwError,
  1518.      IN DWORD dwFlags,
  1519.      IN OUT LPVOID * lppvData
  1520.      );
  1521.  
  1522. INTERNETAPI
  1523. DWORD
  1524. WINAPI
  1525. InternetConfirmZoneCrossing(
  1526.      IN HWND hWnd,
  1527.      IN LPSTR szUrlPrev,
  1528.      IN LPSTR szUrlNew,
  1529.      IN BOOL bPost
  1530.      );
  1531.  
  1532. //#if !defined(_WINERROR_)
  1533.  
  1534. //
  1535. // Internet API error returns
  1536. //
  1537.  
  1538. #define INTERNET_ERROR_BASE                     12000
  1539.  
  1540. #define ERROR_INTERNET_OUT_OF_HANDLES           (INTERNET_ERROR_BASE + 1)
  1541. #define ERROR_INTERNET_TIMEOUT                  (INTERNET_ERROR_BASE + 2)
  1542. #define ERROR_INTERNET_EXTENDED_ERROR           (INTERNET_ERROR_BASE + 3)
  1543. #define ERROR_INTERNET_INTERNAL_ERROR           (INTERNET_ERROR_BASE + 4)
  1544. #define ERROR_INTERNET_INVALID_URL              (INTERNET_ERROR_BASE + 5)
  1545. #define ERROR_INTERNET_UNRECOGNIZED_SCHEME      (INTERNET_ERROR_BASE + 6)
  1546. #define ERROR_INTERNET_NAME_NOT_RESOLVED        (INTERNET_ERROR_BASE + 7)
  1547. #define ERROR_INTERNET_PROTOCOL_NOT_FOUND       (INTERNET_ERROR_BASE + 8)
  1548. #define ERROR_INTERNET_INVALID_OPTION           (INTERNET_ERROR_BASE + 9)
  1549. #define ERROR_INTERNET_BAD_OPTION_LENGTH        (INTERNET_ERROR_BASE + 10)
  1550. #define ERROR_INTERNET_OPTION_NOT_SETTABLE      (INTERNET_ERROR_BASE + 11)
  1551. #define ERROR_INTERNET_SHUTDOWN                 (INTERNET_ERROR_BASE + 12)
  1552. #define ERROR_INTERNET_INCORRECT_USER_NAME      (INTERNET_ERROR_BASE + 13)
  1553. #define ERROR_INTERNET_INCORRECT_PASSWORD       (INTERNET_ERROR_BASE + 14)
  1554. #define ERROR_INTERNET_LOGIN_FAILURE            (INTERNET_ERROR_BASE + 15)
  1555. #define ERROR_INTERNET_INVALID_OPERATION        (INTERNET_ERROR_BASE + 16)
  1556. #define ERROR_INTERNET_OPERATION_CANCELLED      (INTERNET_ERROR_BASE + 17)
  1557. #define ERROR_INTERNET_INCORRECT_HANDLE_TYPE    (INTERNET_ERROR_BASE + 18)
  1558. #define ERROR_INTERNET_INCORRECT_HANDLE_STATE   (INTERNET_ERROR_BASE + 19)
  1559. #define ERROR_INTERNET_NOT_PROXY_REQUEST        (INTERNET_ERROR_BASE + 20)
  1560. #define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21)
  1561. #define ERROR_INTERNET_BAD_REGISTRY_PARAMETER   (INTERNET_ERROR_BASE + 22)
  1562. #define ERROR_INTERNET_NO_DIRECT_ACCESS         (INTERNET_ERROR_BASE + 23)
  1563. #define ERROR_INTERNET_NO_CONTEXT               (INTERNET_ERROR_BASE + 24)
  1564. #define ERROR_INTERNET_NO_CALLBACK              (INTERNET_ERROR_BASE + 25)
  1565. #define ERROR_INTERNET_REQUEST_PENDING          (INTERNET_ERROR_BASE + 26)
  1566. #define ERROR_INTERNET_INCORRECT_FORMAT         (INTERNET_ERROR_BASE + 27)
  1567. #define ERROR_INTERNET_ITEM_NOT_FOUND           (INTERNET_ERROR_BASE + 28)
  1568. #define ERROR_INTERNET_CANNOT_CONNECT           (INTERNET_ERROR_BASE + 29)
  1569. #define ERROR_INTERNET_CONNECTION_ABORTED       (INTERNET_ERROR_BASE + 30)
  1570. #define ERROR_INTERNET_CONNECTION_RESET         (INTERNET_ERROR_BASE + 31)
  1571. #define ERROR_INTERNET_FORCE_RETRY              (INTERNET_ERROR_BASE + 32)
  1572. #define ERROR_INTERNET_INVALID_PROXY_REQUEST    (INTERNET_ERROR_BASE + 33)
  1573. #define ERROR_INTERNET_NEED_UI                  (INTERNET_ERROR_BASE + 34)
  1574.  
  1575. #define ERROR_INTERNET_HANDLE_EXISTS            (INTERNET_ERROR_BASE + 36)
  1576. #define ERROR_INTERNET_SEC_CERT_DATE_INVALID    (INTERNET_ERROR_BASE + 37)
  1577. #define ERROR_INTERNET_SEC_CERT_CN_INVALID      (INTERNET_ERROR_BASE + 38)
  1578. #define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR   (INTERNET_ERROR_BASE + 39)
  1579. #define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR   (INTERNET_ERROR_BASE + 40)
  1580. #define ERROR_INTERNET_MIXED_SECURITY           (INTERNET_ERROR_BASE + 41)
  1581. #define ERROR_INTERNET_CHG_POST_IS_NON_SECURE   (INTERNET_ERROR_BASE + 42)
  1582. #define ERROR_INTERNET_POST_IS_NON_SECURE       (INTERNET_ERROR_BASE + 43)
  1583. #define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED  (INTERNET_ERROR_BASE + 44)
  1584. #define ERROR_INTERNET_INVALID_CA               (INTERNET_ERROR_BASE + 45)
  1585. #define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP    (INTERNET_ERROR_BASE + 46)
  1586. #define ERROR_INTERNET_ASYNC_THREAD_FAILED      (INTERNET_ERROR_BASE + 47)
  1587. #define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE   (INTERNET_ERROR_BASE + 48)
  1588.  
  1589. //
  1590. // FTP API errors
  1591. //
  1592.  
  1593. #define ERROR_FTP_TRANSFER_IN_PROGRESS          (INTERNET_ERROR_BASE + 110)
  1594. #define ERROR_FTP_DROPPED                       (INTERNET_ERROR_BASE + 111)
  1595. #define ERROR_FTP_NO_PASSIVE_MODE               (INTERNET_ERROR_BASE + 112)
  1596.  
  1597. //
  1598. // HTTP API errors
  1599. //
  1600.  
  1601. #define ERROR_HTTP_HEADER_NOT_FOUND             (INTERNET_ERROR_BASE + 150)
  1602. #define ERROR_HTTP_DOWNLEVEL_SERVER             (INTERNET_ERROR_BASE + 151)
  1603. #define ERROR_HTTP_INVALID_SERVER_RESPONSE      (INTERNET_ERROR_BASE + 152)
  1604. #define ERROR_HTTP_INVALID_HEADER               (INTERNET_ERROR_BASE + 153)
  1605. #define ERROR_HTTP_INVALID_QUERY_REQUEST        (INTERNET_ERROR_BASE + 154)
  1606. #define ERROR_HTTP_HEADER_ALREADY_EXISTS        (INTERNET_ERROR_BASE + 155)
  1607. #define ERROR_HTTP_REDIRECT_FAILED              (INTERNET_ERROR_BASE + 156)
  1608. #define ERROR_HTTP_NOT_REDIRECTED               (INTERNET_ERROR_BASE + 160) 
  1609.  
  1610. #define ERROR_INTERNET_SECURITY_CHANNEL_ERROR   (INTERNET_ERROR_BASE + 157) 
  1611. #define ERROR_INTERNET_UNABLE_TO_CACHE_FILE     (INTERNET_ERROR_BASE + 158) 
  1612. #define ERROR_INTERNET_TCPIP_NOT_INSTALLED      (INTERNET_ERROR_BASE + 159) 
  1613.  
  1614. #define INTERNET_ERROR_LAST                     ERROR_INTERNET_TCPIP_NOT_INSTALLED
  1615.  
  1616. //#endif // !defined(_WINERROR_)
  1617.  
  1618. #if defined(__cplusplus)
  1619. }
  1620. #endif
  1621.  
  1622. /*
  1623.  * Return packing to whatever it was before we
  1624.  * entered this file
  1625.  */
  1626. #pragma pack(pop, wininet)
  1627.  
  1628. #endif // !defined(_WININET_)
  1629.